/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * supervision_rh_catalogo.java
 *
 * Created on 3/05/2011, diodblclick06:10:21 PM
 */

package si_rhnominafacil;


import java.sql.*;
import javax.swing.*;
import java.awt.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Calendar;

import java.text.ParseException;
import java.text.*;

/**
 *
 * @author Michelle
 */
public class rh_empleados_catalogo extends javax.swing.JFrame {

    private javax.swing.table.DefaultTableModel jtable_modelo_empleado;
    private javax.swing.table.DefaultTableModel jtable_modelo_empleado_p;
    si_conectar x = new si_conectar();
    ResultSet rs = null;
    
    
    int fempleadoactual=0, fpreguntaactual=0,fpuestoactual=0,findicadoractual,opcioncatalogo=0,controlcomboasi=0;
    private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
    private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");
    String textobuscaemplea="";
    /** Creates new form supervision_rh_catalogo */
    public rh_empleados_catalogo() {
        this.iniciar_modelo_empleado();
        this.iniciar_modelo_empleadoplaza();
        initComponents();
       
        this.setLocation(5,5);
        
        jt_catempleados.getColumnModel().getColumn(0).setPreferredWidth(30);//tem ent
        jt_catempleados.getColumnModel().getColumn(1).setPreferredWidth(80);//familia
        jt_catempleados.getColumnModel().getColumn(2).setPreferredWidth(60);//subfam.
        jt_catempleados.getColumnModel().getColumn(3).setPreferredWidth(120);//tem ent
        jt_catempleados.getColumnModel().getColumn(4).setPreferredWidth(80);//familia
        jt_catempleados.getColumnModel().getColumn(5).setPreferredWidth(40);//subfam.
        jt_catempleados.getColumnModel().getColumn(6).setPreferredWidth(60);//tem ent


        jt_catempleados1.getColumnModel().getColumn(0).setPreferredWidth(20);//tem ent
        jt_catempleados1.getColumnModel().getColumn(1).setPreferredWidth(100);//familia
        jt_catempleados1.getColumnModel().getColumn(2).setPreferredWidth(120);//subfam.
        jt_catempleados1.getColumnModel().getColumn(3).setPreferredWidth(80);//subfam.
        jt_catempleados1.getColumnModel().getColumn(4).setPreferredWidth(160);//tem ent
        jt_catempleados1.getColumnModel().getColumn(5).setPreferredWidth(60);//familia
        jt_catempleados1.getColumnModel().getColumn(6).setPreferredWidth(50);//subfam.
        jt_catempleados1.getColumnModel().getColumn(7).setPreferredWidth(60);//tem ent

        if (si_variables.getnivelusu()==3)
            {
                textobuscaemplea=String.valueOf(si_variables.getdepartamento());
                opcioncatalogo=1;
                this.jbtn_prenomina.setVisible(false);
            }
       System.out.println("nivel"+si_variables.getnivelusu()+" "+textobuscaemplea);
       this.carga_datos_empleado(opcioncatalogo,textobuscaemplea);
       this.buttonGroup1.setSelected(jrb_bdescrip.getModel(),true);
       opcioncatalogo=2;
       this.loadcombodepa();
       controlcomboasi=1;


       this.jtf_busqueda.requestFocus();
       if (si_variables.getnivelusu()<3)
            {
                this.carga_datos_empleadoplazas(0, "");
            }
    }

   

private void iniciar_modelo_empleado()
    {
        jtable_modelo_empleado=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_empleado.addColumn("<html><b>Status</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Dep.</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Puesto</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Nombre</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>Domicilio</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>telefono</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>email</b></html>");
        jtable_modelo_empleado.addColumn("<html><b>F.Ingreso</b></html>");
    }
private void iniciar_modelo_empleadoplaza()
    {
        jtable_modelo_empleado_p=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_empleado_p.addColumn("<html><b>Status</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>Categoria</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>Puesto</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>Area</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>empleado</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>rfc</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>Imss</b></html>");
        jtable_modelo_empleado_p.addColumn("<html><b>F.Ingreso</b></html>");
    }
private void carga_datos_empleado(int opcion,String textobusca)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
       while(jtable_modelo_empleado.getRowCount()>0)jtable_modelo_empleado.removeRow(0);
       Object[] fnewRow = new Object[8];
       try
       {
            rs = x.sieuno_executediversosv2("select * from x1_supervision_empleadosv2("+opcion+",'"+textobusca+"') as (id integer,nombre text,dom_calle character varying(80),dom_colnia character varying(80),dom_pobla character varying(50),dom_codpost character varying(10),dom_codidenti character varying(20),id_tienventas integer,id_depart smallint,id_puesto smallint,id_status smallint,id_jefeinme smallint,id_tipojor smallint,fecha_nac text,fecha_alta text,fecha_baja text,rfc character varying(18),curp character varying(20),imss character varying(20),foto character varying(80),id_causabaja smallint,id_clasif smallint,id_sexo smallint,id_tiposan smallint,id_stadocivil smallint,id_sieuno integer,id_tipocon smallint,descri_depa character varying(80),descri_puesto text,descri_status character varying(25),descri_jorna character varying(25),descri_baja character varying(25),descri_clasif character varying(25),descri_sangre character varying(25),descri_stadocivil character varying(25),descri_contrato character varying(25),telefono character varying(50),email character varying(50));",si_variables.getconexiongral());
            while (rs.next())
                {
                        fnewRow[0]=rs.getString("id_status")+":"+rs.getString("descri_status");
                        fnewRow[1]=rs.getString("id_depart")+":"+rs.getString("descri_depa");
                        fnewRow[2]=rs.getString("id_puesto")+":"+rs.getString("descri_puesto");
                        fnewRow[3]=rs.getString("id")+":"+rs.getString("nombre");
                        //fnewRow[4]=rs.getString("dom_calle");
                        //fnewRow[5]=rs.getString("telefono");
                        //fnewRow[6]=rs.getString("email");
                        fnewRow[4]="";
                        fnewRow[5]="";
                        fnewRow[6]="";
                        fnewRow[7]=rs.getString("fecha_alta");
                        jtable_modelo_empleado.addRow(fnewRow);
                }
       }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
      this.jlbl_cantidadregistros.setText(String.valueOf(this.jtable_modelo_empleado.getRowCount()));
    this.jlbl_textobuscado.setText(this.jtf_busqueda.getText().toUpperCase().trim());
   }
private void carga_datos_empleadoplazas(int opcion,String textobusca)
   {
       //invoco al metodo que trae el recordset de datos
       //voy por el detalle del documento
       String texto="select * from x1_supervision_empleados_catalogo_plazas("+opcion+",'"+textobusca+"','','','') as (idplaza smallint,idarea smallint,idpuesto smallint,idempleado integer,idcontable character varying(20),idstatusplaza smallint,observaplaza text,nivel character varying(20),area text,idnivsup smallint,jerarquia smallint,nivsup character varying(20),descripcion text,nivelsupprincipal character varying(20),puestodescrip text,obspuesto text,idcontabil character varying(12),idcategoria character varying(12),categoria text,categoriaobs text,emp_nombre character varying(50),emp_app character varying(50),emp_apm character varying(50),fechanac date,fechaalta date,rfc character varying(18),curp character varying(20),imss character varying(20));";
       while(jtable_modelo_empleado_p.getRowCount()>0)jtable_modelo_empleado_p.removeRow(0);
       Object[] fnewRow = new Object[8];
       System.out.println(texto);
       try
       {
            rs = x.sieuno_executediversosv2(texto,si_variables.getconexiongral());
            while (rs.next())
                {
                        if(rs.getString("idstatusplaza").equals("1"))
                            {
                                fnewRow[0]="VACANTE";
                            }
                        else
                            {
                                fnewRow[0]="ACTIVO";
                            }
                        fnewRow[1]=rs.getString("idcategoria")+":"+rs.getString("categoria");
                        fnewRow[2]=rs.getString("idplaza")+":"+rs.getString("puestodescrip");
                        fnewRow[3]=rs.getString("area");
                        fnewRow[4]=rs.getString("idempleado")+":"+rs.getString("emp_nombre")+" "+rs.getString("emp_app")+" "+rs.getString("emp_apm");
                        fnewRow[5]=rs.getString("rfc");
                        fnewRow[6]=rs.getString("Imss");
                        fnewRow[7]=rs.getString("fechaalta");
                        jtable_modelo_empleado_p.addRow(fnewRow);
                }
       }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
      this.jlbl_cantidadregistros.setText(String.valueOf(this.jtable_modelo_empleado.getRowCount()));
    this.jlbl_textobuscado.setText(this.jtf_busqueda.getText().toUpperCase().trim());
   }

    private void loadcombodepa(){

            try
            {
                rs = x.sieuno_executediversosv2("select * from x1_supervision_tareas_departamentos() as (id smallint,descrip character varying(80));",si_variables.getconexiongral());
               while (rs.next())
                    {
                      this.jcmbox_depart.addItem(rs.getString("id")+":"+rs.getString("descrip"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }

    private void jt_catempleadosMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
 private void diodblclick(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
   if (si_variables.getnivelusu() == 3)
            {
                    JPasswordField pwd = new JPasswordField(10);
                    int action = JOptionPane.showConfirmDialog(null, pwd,"Contraseña:(Use Tab p/moverse o Mause)",JOptionPane.OK_CANCEL_OPTION);
                    if(action < 0)
                        {
                            JOptionPane.showMessageDialog(null,"No se realiza Proceso, Gracias");
                        }
                    else
                        {
                            if(si_variables.getPassword().equals(String.valueOf(pwd.getPassword())))
                                {
                                     System.out.println("dio doble  click");
                                     int fila = jt_catempleados.getSelectedRow();
                                     String idcadena[]=this.jt_catempleados.getValueAt(fila, 2).toString().split(":");
                                     String idcadenaemp[]=this.jt_catempleados.getValueAt(fila, 3).toString().split(":");
                                     //JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
                                     rh_empleados_edita fsrhe=new rh_empleados_edita(Integer.valueOf(idcadenaemp[0]),3);
                                     fsrhe.pack();
                                     fsrhe.setVisible(true);
                                }
                        }

               //this.carga_datos_detalleinve(ftienda, ffoliopadre,1,idcadena);
            }
        if (si_variables.getnivelusu() < 3)
            {
                System.out.println("dio doble  click");
                int fila = jt_catempleados.getSelectedRow();
                String idcadena[]=this.jt_catempleados.getValueAt(fila, 2).toString().split(":");
                String idcadenaemp[]=this.jt_catempleados.getValueAt(fila, 3).toString().split(":");
//                JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
                rh_empleados_edita fsrhe=new rh_empleados_edita(Integer.valueOf(idcadenaemp[0]),3);
                fsrhe.pack();
                fsrhe.setVisible(true);
            }
    }

  private void diodblclickp(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:

        if (si_variables.getnivelusu() < 3)
            {
                System.out.println("dio doble  click");
                int fila = jt_catempleados1.getSelectedRow();
                String idcadenaemp[]=this.jtable_modelo_empleado_p.getValueAt(fila, 4).toString().split(":");
//                JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
                rh_empleados_edita fsrhe=new rh_empleados_edita(Integer.valueOf(idcadenaemp[0]),3);
                fsrhe.pack();
                fsrhe.setVisible(true);
            }
    }
   private void diodblclickpe(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:

        if (si_variables.getnivelusu() < 3)
            {
                System.out.println("dio doble  click");
                int fila = jt_catempleados1.getSelectedRow();
                

                this.jtf_plazaidemp.setText(this.jtable_modelo_empleado_p.getValueAt(fila, 3).toString());
                
                String idcad[]=this.jtable_modelo_empleado_p.getValueAt(fila, 2).toString().split(":");
                this.jtf_plazaidemp1.setText(idcad[1]);
                this.jtf_plazaidplaza.setText(idcad[0]);
            }
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jbtn_indicadores = new javax.swing.JToggleButton();
        jbtn_salir = new javax.swing.JButton();
        jbtn_agregar = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jbtn_asistencia = new javax.swing.JButton();
        jbtn_prenomina = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jtf_busqueda = new javax.swing.JTextField();
        jbtn_buscar = new javax.swing.JButton();
        jrb_departamento = new javax.swing.JRadioButton();
        jrb_bdescrip = new javax.swing.JRadioButton();
        jrb_bclave = new javax.swing.JRadioButton();
        jLabel1 = new javax.swing.JLabel();
        jcmbox_depart = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        jrb_departamento1 = new javax.swing.JRadioButton();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jt_catempleados = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jLabel4 = new javax.swing.JLabel();
        jlbl_textobuscado = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jlbl_cantidadregistros = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jt_catempleados1 = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        }
        ;
        jPanel5 = new javax.swing.JPanel();
        jButton7 = new javax.swing.JButton();
        jtf_plazaidplaza = new javax.swing.JTextField();
        jtf_plazaidemp1 = new javax.swing.JTextField();
        jtf_plazaidemp = new javax.swing.JTextField();
        jLabel42 = new javax.swing.JLabel();
        jtf_plazaidplaza1 = new javax.swing.JTextField();
        jLabel71 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jmni_salir = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jmni_escape = new javax.swing.JMenuItem();
        jmni_actulizar = new javax.swing.JMenuItem();
        jmni_buscar = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(si_rhnominafacil.Si_rhnominafacilApp.class).getContext().getResourceMap(rh_empleados_catalogo.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel1.setName("jPanel1"); // NOI18N

        jbtn_indicadores.setIcon(resourceMap.getIcon("jbtn_indicadores.icon")); // NOI18N
        jbtn_indicadores.setText(resourceMap.getString("jbtn_indicadores.text")); // NOI18N
        jbtn_indicadores.setToolTipText(resourceMap.getString("jbtn_indicadores.toolTipText")); // NOI18N
        jbtn_indicadores.setName("jbtn_indicadores"); // NOI18N
        jbtn_indicadores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_indicadoresActionPerformed(evt);
            }
        });

        jbtn_salir.setIcon(resourceMap.getIcon("jbtn_salir.icon")); // NOI18N
        jbtn_salir.setText(resourceMap.getString("jbtn_salir.text")); // NOI18N
        jbtn_salir.setName("jbtn_salir"); // NOI18N
        jbtn_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_salirActionPerformed(evt);
            }
        });

        jbtn_agregar.setIcon(resourceMap.getIcon("jbtn_agregar.icon")); // NOI18N
        jbtn_agregar.setText(resourceMap.getString("jbtn_agregar.text")); // NOI18N
        jbtn_agregar.setName("jbtn_agregar"); // NOI18N
        jbtn_agregar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_agregarActionPerformed(evt);
            }
        });

        jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jbtn_asistencia.setIcon(resourceMap.getIcon("jbtn_asistencia.icon")); // NOI18N
        jbtn_asistencia.setText(resourceMap.getString("jbtn_asistencia.text")); // NOI18N
        jbtn_asistencia.setName("jbtn_asistencia"); // NOI18N
        jbtn_asistencia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_asistenciaActionPerformed(evt);
            }
        });

        jbtn_prenomina.setIcon(resourceMap.getIcon("jbtn_prenomina.icon")); // NOI18N
        jbtn_prenomina.setText(resourceMap.getString("jbtn_prenomina.text")); // NOI18N
        jbtn_prenomina.setToolTipText(resourceMap.getString("jbtn_prenomina.toolTipText")); // NOI18N
        jbtn_prenomina.setName("jbtn_prenomina"); // NOI18N
        jbtn_prenomina.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_prenominaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addComponent(jbtn_agregar)
                .addGap(18, 18, 18)
                .addComponent(jbtn_indicadores)
                .addGap(18, 18, 18)
                .addComponent(jButton1)
                .addGap(26, 26, 26)
                .addComponent(jbtn_asistencia)
                .addGap(30, 30, 30)
                .addComponent(jbtn_prenomina)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 154, Short.MAX_VALUE)
                .addComponent(jbtn_salir)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbtn_salir)
                    .addComponent(jbtn_agregar)
                    .addComponent(jbtn_indicadores, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton1)
                    .addComponent(jbtn_prenomina)
                    .addComponent(jbtn_asistencia))
                .addContainerGap(5, Short.MAX_VALUE))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel2.border.title"))); // NOI18N
        jPanel2.setName("jPanel2"); // NOI18N

        jtf_busqueda.setToolTipText(resourceMap.getString("jtf_busqueda.toolTipText")); // NOI18N
        jtf_busqueda.setName("jtf_busqueda"); // NOI18N
        jtf_busqueda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_busquedaActionPerformed(evt);
            }
        });

        jbtn_buscar.setIcon(resourceMap.getIcon("jbtn_buscar.icon")); // NOI18N
        jbtn_buscar.setText(resourceMap.getString("jbtn_buscar.text")); // NOI18N
        jbtn_buscar.setName("jbtn_buscar"); // NOI18N
        jbtn_buscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_buscarActionPerformed(evt);
            }
        });

        buttonGroup1.add(jrb_departamento);
        jrb_departamento.setText(resourceMap.getString("jrb_departamento.text")); // NOI18N
        jrb_departamento.setToolTipText(resourceMap.getString("jrb_departamento.toolTipText")); // NOI18N
        jrb_departamento.setActionCommand(resourceMap.getString("jrb_departamento.actionCommand")); // NOI18N
        jrb_departamento.setName("jrb_departamento"); // NOI18N
        jrb_departamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrb_departamentoActionPerformed(evt);
            }
        });

        buttonGroup1.add(jrb_bdescrip);
        jrb_bdescrip.setText(resourceMap.getString("jrb_bdescrip.text")); // NOI18N
        jrb_bdescrip.setToolTipText(resourceMap.getString("jrb_bdescrip.toolTipText")); // NOI18N
        jrb_bdescrip.setActionCommand(resourceMap.getString("jrb_bdescrip.actionCommand")); // NOI18N
        jrb_bdescrip.setName("jrb_bdescrip"); // NOI18N
        jrb_bdescrip.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrb_bdescripActionPerformed(evt);
            }
        });

        buttonGroup1.add(jrb_bclave);
        jrb_bclave.setText(resourceMap.getString("jrb_bclave.text")); // NOI18N
        jrb_bclave.setToolTipText(resourceMap.getString("jrb_bclave.toolTipText")); // NOI18N
        jrb_bclave.setActionCommand(resourceMap.getString("jrb_bclave.actionCommand")); // NOI18N
        jrb_bclave.setName("jrb_bclave"); // NOI18N
        jrb_bclave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrb_bclaveActionPerformed(evt);
            }
        });

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jcmbox_depart.setToolTipText(resourceMap.getString("jcmbox_depart.toolTipText")); // NOI18N
        jcmbox_depart.setName("jcmbox_depart"); // NOI18N
        jcmbox_depart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcmbox_departActionPerformed(evt);
            }
        });

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        buttonGroup1.add(jrb_departamento1);
        jrb_departamento1.setName("jrb_departamento1"); // NOI18N
        jrb_departamento1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrb_departamento1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(236, 236, 236)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jrb_bclave)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(34, 34, 34)
                        .addComponent(jrb_bdescrip)
                        .addGap(30, 30, 30)
                        .addComponent(jrb_departamento)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jrb_departamento1))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jtf_busqueda, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(31, 31, 31)
                        .addComponent(jbtn_buscar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jcmbox_depart, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(93, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtf_busqueda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbtn_buscar)
                    .addComponent(jLabel1)
                    .addComponent(jcmbox_depart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jrb_departamento)
                    .addComponent(jrb_bclave)
                    .addComponent(jrb_bdescrip)
                    .addComponent(jrb_departamento1))
                .addContainerGap())
        );

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel3.setName("jPanel3"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jt_catempleados.setModel(this.jtable_modelo_empleado);
        jt_catempleados.setName("jt_catempleados"); // NOI18N
        jt_catempleados.setRowHeight(22);
        jt_catempleados.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jt_catempleadosMouseClicked(evt);
                if(evt.getClickCount() >= 2)
                {
                    diodblclick(evt);
                    //System.out.println(" double click" );

                }
            }
        });
        jScrollPane1.setViewportView(jt_catempleados);

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jlbl_textobuscado.setFont(resourceMap.getFont("jlbl_textobuscado.font")); // NOI18N
        jlbl_textobuscado.setText(resourceMap.getString("jlbl_textobuscado.text")); // NOI18N
        jlbl_textobuscado.setName("jlbl_textobuscado"); // NOI18N

        jLabel3.setFont(resourceMap.getFont("jLabel3.font")); // NOI18N
        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jlbl_cantidadregistros.setFont(resourceMap.getFont("jlbl_cantidadregistros.font")); // NOI18N
        jlbl_cantidadregistros.setText(resourceMap.getString("jlbl_cantidadregistros.text")); // NOI18N
        jlbl_cantidadregistros.setName("jlbl_cantidadregistros"); // NOI18N

        jLabel5.setFont(resourceMap.getFont("jLabel5.font")); // NOI18N
        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jlbl_textobuscado, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel3)
                .addGap(18, 18, 18)
                .addComponent(jlbl_cantidadregistros, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel5)
                .addContainerGap())
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 971, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jlbl_cantidadregistros)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4)
                    .addComponent(jlbl_textobuscado))
                .addGap(9, 9, 9)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Catalogo de Empleados", jPanel3);

        jPanel4.setName("jPanel4"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jt_catempleados1.setModel(this.jtable_modelo_empleado_p);
        jt_catempleados1.setName("jt_catempleados1"); // NOI18N
        jt_catempleados1.setRowHeight(22);
        jt_catempleados1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jt_catempleados1MouseClicked(evt);
                if(evt.getClickCount() >= 2)
                {
                    diodblclickp(evt);
                    //System.out.println(" double click" );

                }
                if(evt.getClickCount() >= 1)
                {
                    diodblclickpe(evt);
                    //System.out.println(" double click" );

                }
            }
        });
        jScrollPane2.setViewportView(jt_catempleados1);

        jPanel5.setName("jPanel5"); // NOI18N

        jButton7.setName("jButton7"); // NOI18N
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });

        jtf_plazaidplaza.setEditable(false);
        jtf_plazaidplaza.setName("jtf_plazaidplaza"); // NOI18N

        jtf_plazaidemp1.setEditable(false);
        jtf_plazaidemp1.setName("jtf_plazaidemp1"); // NOI18N

        jtf_plazaidemp.setEditable(false);
        jtf_plazaidemp.setName("jtf_plazaidemp"); // NOI18N

        jLabel42.setName("jLabel42"); // NOI18N

        jtf_plazaidplaza1.setName("jtf_plazaidplaza1"); // NOI18N

        jLabel71.setName("jLabel71"); // NOI18N

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel42)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_plazaidemp, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_plazaidemp1, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_plazaidplaza, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel71)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_plazaidplaza1, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(61, 61, 61)
                .addComponent(jButton7)
                .addGap(102, 102, 102))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtf_plazaidemp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel42)
                    .addComponent(jButton7)
                    .addComponent(jtf_plazaidplaza1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel71)
                    .addComponent(jtf_plazaidplaza, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtf_plazaidemp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 971, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap(402, Short.MAX_VALUE)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel4Layout.createSequentialGroup()
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 393, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(56, Short.MAX_VALUE)))
        );

        jTabbedPane1.addTab("Catalogo de Plazas", jPanel4);

        jMenuBar1.setName("jMenuBar1"); // NOI18N

        jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
        jMenu1.setName("jMenu1"); // NOI18N

        jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
        jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
        jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
        jmni_salir.setName("jmni_salir"); // NOI18N
        jmni_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_salirActionPerformed(evt);
            }
        });
        jMenu1.add(jmni_salir);

        jMenuBar1.add(jMenu1);

        jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
        jMenu2.setName("jMenu2"); // NOI18N

        jmni_escape.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
        jmni_escape.setText(resourceMap.getString("jmni_escape.text")); // NOI18N
        jmni_escape.setName("jmni_escape"); // NOI18N
        jmni_escape.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_escapeActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_escape);

        jmni_actulizar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, 0));
        jmni_actulizar.setIcon(resourceMap.getIcon("jmni_actulizar.icon")); // NOI18N
        jmni_actulizar.setText(resourceMap.getString("jmni_actulizar.text")); // NOI18N
        jmni_actulizar.setName("jmni_actulizar"); // NOI18N
        jmni_actulizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_actulizarActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_actulizar);

        jmni_buscar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.ALT_MASK));
        jmni_buscar.setText(resourceMap.getString("jmni_buscar.text")); // NOI18N
        jmni_buscar.setName("jmni_buscar"); // NOI18N
        jmni_buscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_buscarActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_buscar);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 976, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(4, 4, 4)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 477, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
       if(JOptionPane.showConfirmDialog(null, "Desea Salir?")==0)
                {
                    this.dispose();
                }
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jbtn_indicadoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_indicadoresActionPerformed
        // TODO add your handling code here:
    /*supervision_indicadores_aplica fsia=new supervision_indicadores_aplica();
    fsia.pack();
    fsia.setVisible(true);*/
    }//GEN-LAST:event_jbtn_indicadoresActionPerformed


    private void jbtn_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_salirActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jbtn_salirActionPerformed

    private void jbtn_agregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_agregarActionPerformed
        // TODO add your handling code here:
        JFrame mainFrame = Si_rhnominafacilApp.getApplication().getMainFrame();
        rh_empleados_alta fsrha=new rh_empleados_alta(mainFrame,true);
        fsrha.pack();
        fsrha.setVisible(true);
    }//GEN-LAST:event_jbtn_agregarActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
   /* supervision_indicadores_detalle fsid=new supervision_indicadores_detalle();
    fsid.pack();
    fsid.setVisible(true);*/
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jtf_busquedaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_busquedaActionPerformed
        // TODO add your handling code here:
        this.jbtn_buscarActionPerformed(evt);
}//GEN-LAST:event_jtf_busquedaActionPerformed

    private void jbtn_buscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_buscarActionPerformed
        // TODO add your handling code here:
        // this.jtf_busqueda.getText();
        if(JOptionPane.showConfirmDialog(null, "Estan Correctos sus Datos?")==0)
            {
                this.carga_datos_empleado(opcioncatalogo, this.jtf_busqueda.getText().trim().toUpperCase());
                if (si_variables.getnivelusu()<3)
                    {
                    this.carga_datos_empleadoplazas(opcioncatalogo, this.jtf_busqueda.getText().trim().toUpperCase());
                    }
            }
            else
            {
                this.jtf_busqueda.requestFocus();
            }


    }//GEN-LAST:event_jbtn_buscarActionPerformed

    private void jrb_bdescripActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bdescripActionPerformed
        // TODO add your handling code here:
        opcioncatalogo=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrb_bdescripActionPerformed

    private void jrb_bclaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_bclaveActionPerformed
        // TODO add your handling code here:
        opcioncatalogo=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrb_bclaveActionPerformed

    private void jrb_departamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_departamentoActionPerformed
        // TODO add your handling code here:
        opcioncatalogo=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrb_departamentoActionPerformed

    private void jcmbox_departActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbox_departActionPerformed
        // TODO add your handling code here:
       if(controlcomboasi==1)
           {
           
                String arreglo_depasi[]=this.jcmbox_depart.getSelectedItem().toString().split(":");
                opcioncatalogo=1;
                this.buttonGroup1.setSelected(jrb_departamento.getModel(),true);
                this.jtf_busqueda.setText(arreglo_depasi[0]);
                this.jbtn_buscarActionPerformed(evt);
           

           }
    }//GEN-LAST:event_jcmbox_departActionPerformed

    private void jmni_actulizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_actulizarActionPerformed
        // TODO add your handling code here:
        this.carga_datos_empleado(opcioncatalogo,textobuscaemplea);
    }//GEN-LAST:event_jmni_actulizarActionPerformed

    private void jbtn_asistenciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_asistenciaActionPerformed
        // TODO add your handling code here:

        
                rh_empleados_asistencia_xdia fsrad=new rh_empleados_asistencia_xdia();
                 fsrad.pack();
                 fsrad.setVisible(true);


    
    }//GEN-LAST:event_jbtn_asistenciaActionPerformed

    private void jmni_escapeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_escapeActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_escapeActionPerformed

    private void jmni_buscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_buscarActionPerformed
        // TODO add your handling code here:
        this.jbtn_buscarActionPerformed(evt);
    }//GEN-LAST:event_jmni_buscarActionPerformed

    private void jbtn_prenominaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_prenominaActionPerformed
        // TODO add your handling code here:
            rh_empleados_prenomina fsrhp=new rh_empleados_prenomina();
            fsrhp.pack();
            fsrhp.setVisible(true);
    }//GEN-LAST:event_jbtn_prenominaActionPerformed

    private void jrb_departamento1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrb_departamento1ActionPerformed
        // TODO add your handling code here:
          opcioncatalogo=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrb_departamento1ActionPerformed

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
        // TODO add your handling code here:
        
        if(JOptionPane.showConfirmDialog(null, "<html><b><h2>Plaza:<br>"+this.jtf_plazaidemp1.getText()+"<br> Estan Correctos sus Datos</h2></b></html>?")==0) {
            String  texto="select * from x1_supervision_empleados_actualiza_plaza(3,0,"+this.jtf_plazaidplaza.getText()+",'','"+""+"','"+this.jtf_plazaidplaza1.getText()+"','');",confirma="";
            System.out.println(texto);
            try {
                rs = x.sieuno_executediversosv2(texto,si_variables.getconexiongral());

                while (rs.next()) {
                    confirma=rs.getString(1);
                }
            } catch(Exception e) {
                System.out.println(e.getMessage());
            }
            if (confirma.equals("1")) {

                JOptionPane.showMessageDialog(null,"Gracias status actualizado Correctamente", "Sistema Integral Tareas",1);


            } else {
                JOptionPane.showMessageDialog(null,"Error Verifiqu con Administrador no se ha podido guardar", "Sistema Integral Error",1);

            }
        }
}//GEN-LAST:event_jButton7ActionPerformed
 private void jt_catempleados1MouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new rh_empleados_catalogo().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton7;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel71;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JButton jbtn_agregar;
    private javax.swing.JButton jbtn_asistencia;
    private javax.swing.JButton jbtn_buscar;
    private javax.swing.JToggleButton jbtn_indicadores;
    private javax.swing.JButton jbtn_prenomina;
    private javax.swing.JButton jbtn_salir;
    private javax.swing.JComboBox jcmbox_depart;
    private javax.swing.JLabel jlbl_cantidadregistros;
    private javax.swing.JLabel jlbl_textobuscado;
    private javax.swing.JMenuItem jmni_actulizar;
    private javax.swing.JMenuItem jmni_buscar;
    private javax.swing.JMenuItem jmni_escape;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JRadioButton jrb_bclave;
    private javax.swing.JRadioButton jrb_bdescrip;
    private javax.swing.JRadioButton jrb_departamento;
    private javax.swing.JRadioButton jrb_departamento1;
    private javax.swing.JTable jt_catempleados;
    private javax.swing.JTable jt_catempleados1;
    private javax.swing.JTextField jtf_busqueda;
    private javax.swing.JTextField jtf_plazaidemp;
    private javax.swing.JTextField jtf_plazaidemp1;
    private javax.swing.JTextField jtf_plazaidplaza;
    private javax.swing.JTextField jtf_plazaidplaza1;
    // End of variables declaration//GEN-END:variables

}
